import { markRaw } from 'vue';
import { RouteRecordRaw } from 'vue-router';
import RouterTransition from '@/components/routerTransition.vue';

const routeName = 'system';

const routes: Array<RouteRecordRaw> = [
    {
        path: '/system',
        name: routeName,
        redirect: '/system/user',
        component: markRaw(RouterTransition),
        meta: {
            title: 'yl.systemMgt',
            icon: 'SettingOutlined',
        },
        children: [
            {
                path: 'user',
                name: `${routeName}-list`,
                meta: {
                    title: 'yl.userMgt',
                    icon: 'TeamOutlined',
                },
                component: () => import(/* webpackChunkName: "system" */ '@/views/system/user/index.vue'),
            },
            {
                path: 'role',
                name: `${routeName}-role`,
                meta: {
                    title: 'yl.roleMgt',
                    icon: 'people-top-card',
                },
                component: () => import(/* webpackChunkName: "system" */ '@/views/system/role/index.vue'),
            },
            {
                path: 'menu',
                name: `${routeName}-menu`,
                meta: {
                    title: 'yl.menuMgt',
                    icon: 'application-one',
                },
                component: () => import(/* webpackChunkName: "system" */ '@/views/system/menu/index.vue'),
            },
            {
                path: 'department',
                name: `${routeName}-department`,
                meta: {
                    title: 'yl.departmentMgt',
                    icon: 'ShareAltOutlined',
                },
                component: () => import(/* webpackChunkName: "system" */ '@/views/system/department/index.vue'),
            },
            {
                path: 'custom',
                name: `${routeName}-custom`,
                meta: {
                    title: 'yl.customFunction',
                    icon: 'concept-sharing',
                },
                component: () => import(/* webpackChunkName: "custom" */ '@/views/system/custom/index.vue'),
            },
            {
                path: 'info',
                name: `${routeName}-info`,
                meta: {
                    title: 'yl.info',
                    icon: 'UserOutlined',
                },
                component: () => import(/* webpackChunkName: "info" */ '@/views/system/info/index.vue'),
            },
            {
                path: 'dictionary',
                name: `${routeName}-dictionary`,
                meta: {
                    title: 'yl.dictionaryMgt',
                    icon: 'book-one',
                },
                component: () => import(/* webpackChunkName: "system" */ '@/views/system/dictionary/index.vue'),
            },
            {
                path: 'typeSeries',
                name: `${routeName}-typeSeries`,
                meta: {
                    title: 'yl.typeSeries',
                    icon: 'transfer',
                },
                component: () => import(/* webpackChunkName: "warehouse" */ '@/views/warehouse/typeSeries/index.vue'),
            },
            {
                path: 'docking',
                name: `${routeName}-docking`,
                meta: {
                    title: 'yl.docking',
                    icon: 'transfer',
                },
                component: () => import(/* webpackChunkName: "warehouse" */ '@/views/system/docking/index.vue'),
            },

            {
                path: 'customized',
                name: `${routeName}-customized`,
                meta: {
                    title: 'yl.customized',
                    icon: 'transfer',
                },
                component: () => import(/* webpackChunkName: "warehouse" */ '@/views/system/customized/index.vue'),
            },
        ],
    },
];

export default routes;
